# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=ddnsc
pkgver=2.3.0
pkgrel=0
pkgdesc="simple dynamic dns update tool that supports multiple service providers"
url="https://github.com/shyaminayesh/ddnsc"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3 py3-requests"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/shyaminayesh/ddnsc/archive/refs/tags/v$pkgver.tar.gz
	ddnsc.initd
	"
subpackages="$pkgname-openrc"
options="!check"  # no tests

package() {
	install -Dm644 ddnsc.py "$pkgdir/usr/share/$pkgname/ddnsc.py"
	cp -r plugins "$pkgdir/usr/share/$pkgname/"
	cp -r helpers "$pkgdir/usr/share/$pkgname/"

	install -Dm600 .configs/ddnsc.conf "$pkgdir"/etc/ddnsc/ddnsc.conf

	install -Dm755 "$srcdir"/ddnsc.initd "$pkgdir"/etc/init.d/ddnsc
}

sha512sums="
b476f2cb1ebf95941cba111f480ab2079ff84ddf5dbc4c5e8732f66978a8b1bd97c6f3b81f0e849d6a0477a10338b5a5aca25be3119deef9393ae84c8059bfe8  ddnsc-2.3.0.tar.gz
078cb11610547a5a91ff014518345539953ec54936e6dafe911002325898f098c28093238fb1d0f7a513fbc6033dcd847e832e65921409541346c875952be1af  ddnsc.initd
"
